package org.example.hansp.collection_.set_;

import java.util.HashSet;
@SuppressWarnings({"all"})
public class HashSetSource {
    public static void main(String[] args) {
        HashSet hashSet = new HashSet();
       /* for (int i = 0; i < 100; i++) {
            hashSet.add(i);
        }*/
        for (int i = 0; i < 12; i++) {
            hashSet.add(new A(i));
        }

    }
}

class A{
    int n;

    public A(int n) {
        this.n = n;
    }
/*   @Override
    public boolean equals(Object obj) {
            if(this==obj){
                return true;
            }else
            if(obj instanceof A){
                A a = (A) obj;
                return a.n == n;
            }
        return false;
    }*/

    @Override
    public int hashCode() {
        return 100;
    }
}